package com.itheima.controller;

import com.itheima.entity.ConfigNew;
import com.itheima.result.R;
import com.itheima.service.SysConfigService;
import com.itheima.vo.ConfigNewVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @projectName: kafka
 * @package: com.itheima.controller
 * @className: SysConfigController
 * @author: Eric
 * @description: TODO
 * @date: 2023/9/26 19:41
 * @version: 1.0
 */
@Slf4j
@RestController
@RequestMapping("/sys_config")
@AllArgsConstructor
public class SysConfigController {
    private final SysConfigService sysConfigService;

    @GetMapping("/all")
    public R<ConfigNew> getAllConfigurations(){
        ConfigNew configNewList = sysConfigService.getAllConfigurations();
        return R.success(configNewList);
    }
}
